.class public Lcom/bitauto/autoeasy/picture/PictureAdapter;
.super Lcom/bitauto/autoeasy/tool/ArrayListAdapter;
.source "PictureAdapter.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/bitauto/autoeasy/picture/PictureAdapter$ViewHolder;
    }
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "Lcom/bitauto/autoeasy/tool/ArrayListAdapter",
        "<",
        "Lcom/bitauto/autoeasy/picture/PictureParser$ImageList;",
        ">;"
    }
.end annotation


# instance fields
.field private gridView:Landroid/widget/GridView;

.field private size:I


# direct methods
.method public constructor <init>(Landroid/app/Activity;)V
    .locals 0
    .parameter "context"

    .prologue
    .line 36
    invoke-direct {p0, p1}, Lcom/bitauto/autoeasy/tool/ArrayListAdapter;-><init>(Landroid/app/Activity;)V

    .line 37
    return-void
.end method


# virtual methods
.method public getGridView()Landroid/widget/GridView;
    .locals 1

    .prologue
    .line 26
    iget-object v0, p0, Lcom/bitauto/autoeasy/picture/PictureAdapter;->gridView:Landroid/widget/GridView;

    return-object v0
.end method

.method public getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .locals 9
    .parameter "position"
    .parameter "convertView"
    .parameter "parent"

    .prologue
    .line 45
    move-object v3, p2

    .line 48
    .local v3, root:Landroid/view/View;
    if-nez v3, :cond_0

    .line 49
    new-instance v0, Lcom/bitauto/autoeasy/picture/PictureAdapter$ViewHolder;

    invoke-direct {v0, p0}, Lcom/bitauto/autoeasy/picture/PictureAdapter$ViewHolder;-><init>(Lcom/bitauto/autoeasy/picture/PictureAdapter;)V

    .line 50
    .local v0, holder:Lcom/bitauto/autoeasy/picture/PictureAdapter$ViewHolder;
    iget-object v4, p0, Lcom/bitauto/autoeasy/picture/PictureAdapter;->mContext:Landroid/app/Activity;

    invoke-virtual {v4}, Landroid/app/Activity;->getLayoutInflater()Landroid/view/LayoutInflater;

    move-result-object v2

    .line 51
    .local v2, inflater:Landroid/view/LayoutInflater;
    const v4, 0x7f03000b

    const/4 v5, 0x0

    invoke-virtual {v2, v4, v5}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v3

    .line 52
    const v4, 0x7f0b0001

    invoke-virtual {v3, v4}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v4

    check-cast v4, Lcom/bitauto/autoeasy/widget/RemoteImageView;

    iput-object v4, v0, Lcom/bitauto/autoeasy/picture/PictureAdapter$ViewHolder;->imageView:Lcom/bitauto/autoeasy/widget/RemoteImageView;

    .line 54
    invoke-virtual {v3, v0}, Landroid/view/View;->setTag(Ljava/lang/Object;)V

    .line 59
    .end local v2           #inflater:Landroid/view/LayoutInflater;
    :goto_0
    invoke-virtual {p0, p1}, Lcom/bitauto/autoeasy/picture/PictureAdapter;->getItem(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/bitauto/autoeasy/picture/PictureParser$ImageList;

    .line 62
    .local v1, image:Lcom/bitauto/autoeasy/picture/PictureParser$ImageList;
    iget-object v4, v0, Lcom/bitauto/autoeasy/picture/PictureAdapter$ViewHolder;->imageView:Lcom/bitauto/autoeasy/widget/RemoteImageView;

    const v5, 0x7f020008

    invoke-static {v5}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v5

    invoke-virtual {v4, v5}, Lcom/bitauto/autoeasy/widget/RemoteImageView;->setDefaultImage(Ljava/lang/Integer;)V

    .line 63
    iget-object v4, v0, Lcom/bitauto/autoeasy/picture/PictureAdapter$ViewHolder;->imageView:Lcom/bitauto/autoeasy/widget/RemoteImageView;

    invoke-virtual {v1}, Lcom/bitauto/autoeasy/picture/PictureParser$ImageList;->getFileurl()Ljava/lang/String;

    move-result-object v5

    const-string v6, "{0}"

    new-instance v7, Ljava/lang/StringBuilder;

    iget v8, p0, Lcom/bitauto/autoeasy/picture/PictureAdapter;->size:I

    invoke-static {v8}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v8

    invoke-direct {v7, v8}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v5, v6, v7}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Lcom/bitauto/autoeasy/widget/RemoteImageView;->setImageUrl(Ljava/lang/String;)V

    .line 67
    return-object v3

    .line 56
    .end local v0           #holder:Lcom/bitauto/autoeasy/picture/PictureAdapter$ViewHolder;
    .end local v1           #image:Lcom/bitauto/autoeasy/picture/PictureParser$ImageList;
    :cond_0
    invoke-virtual {v3}, Landroid/view/View;->getTag()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/bitauto/autoeasy/picture/PictureAdapter$ViewHolder;

    .restart local v0       #holder:Lcom/bitauto/autoeasy/picture/PictureAdapter$ViewHolder;
    goto :goto_0
.end method

.method public plusURL(Lcom/bitauto/autoeasy/picture/PictureParser$ImageList;I)Ljava/lang/String;
    .locals 4
    .parameter "image"
    .parameter "position"

    .prologue
    .line 71
    invoke-virtual {p1}, Lcom/bitauto/autoeasy/picture/PictureParser$ImageList;->getFileurl()Ljava/lang/String;

    move-result-object v0

    const-string v1, "{0}"

    new-instance v2, Ljava/lang/StringBuilder;

    iget v3, p0, Lcom/bitauto/autoeasy/picture/PictureAdapter;->size:I

    invoke-static {v3}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v3

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public setGridView(Landroid/widget/GridView;)V
    .locals 0
    .parameter "gridView"

    .prologue
    .line 30
    iput-object p1, p0, Lcom/bitauto/autoeasy/picture/PictureAdapter;->gridView:Landroid/widget/GridView;

    .line 31
    return-void
.end method

.method public setSize(I)V
    .locals 0
    .parameter "size"

    .prologue
    .line 40
    iput p1, p0, Lcom/bitauto/autoeasy/picture/PictureAdapter;->size:I

    .line 41
    return-void
.end method
